import router from "../../../apis/routers";

const key = getFilePathStore(import.meta.url);

export const useHomeIndexComponentsStore = defineStore(key, {
    state: () => ({
        images: [
            { url: '/src/assets/image/image2.jpeg', text: "九型人格测试1", action: () => {
                console.log('a');
                router.push({name:"testStart"})
            }, context: '九型人格测试简介.九型人格测试简介.九型人格测试简介.九型人格测试简介.九型人格测试简介.' },
            { url: '/src/assets/image/image3.jpeg', text: "九型人格测试2", action: () => { console.log(2); }, context: '九型人格测试简介.九型人格测试简介.九型人格测试简介.九型人格测试简介.九型人格测试简介.' },
            { url: '/src/assets/image/image4.jpeg', text: "九型人格测试3", action: () => { console.log(3); }, context: '九型人格测试简介.九型人格测试简介.九型人格测试简介.九型人格测试简介.九型人格测试简介.' },
            { url: '/src/assets/image/image6.jpeg', text: "九型人格测试4", action: () => { console.log(4); }, context: '九型人格测试简介.九型人格测试简介.九型人格测试简介.九型人格测试简介.九型人格测试简介.' },
            { url: '/src/assets/image/image7.jpeg', text: "九型人格测试5", action: () => { console.log(5); }, context: '九型人格测试简介.九型人格测试简介.九型人格测试简介.九型人格测试简介.九型人格测试简介.' },
        ]
    }),
    actions: {
        async initDefault() {
        },
    },
    persist: {
        key: key,
        storage: sessionStorage
    }
});